Optimal. Leaf size=50 \[ \frac {1}{2} \left (2 a^2+b^2\right ) x-\frac {2 a b \cos (e+f x)}{f}-\frac {b^2 \cos (e+f x) \sin (e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 1, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2723}
\begin {gather*} \frac {1}{2} x \left (2 a^2+b^2\right )-\frac {2 a b \cos (e+f x)}{f}-\frac {b^2 \sin (e+f x) \cos (e+f x)}{2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2723
Rubi steps
\begin {align*} \int (a+b \sin (e+f x))^2 \, dx &=\frac {1}{2} \left (2 a^2+b^2\right ) x-\frac {2 a b \cos (e+f x)}{f}-\frac {b^2 \cos (e+f x) \sin (e+f x)}{2 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 46, normalized size = 0.92 \begin {gather*} -\frac {-2 \left (2 a^2+b^2\right ) (e+f x)+8 a b \cos (e+f x)+b^2 \sin (2 (e+f x))}{4 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 51, normalized size = 1.02
method | result | size |
risch | \(a^{2} x +\frac {b^{2} x}{2}-\frac {2 a b \cos \left (f x +e \right )}{f}-\frac {b^{2} \sin \left (2 f x +2 e \right )}{4 f}\) | \(43\) |
derivativedivides | \(\frac {b^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a b \cos \left (f x +e \right )+a^{2} \left (f x +e \right )}{f}\) | \(51\) |
default | \(\frac {b^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a b \cos \left (f x +e \right )+a^{2} \left (f x +e \right )}{f}\) | \(51\) |
norman | \(\frac {\left (a^{2}+\frac {b^{2}}{2}\right ) x +\frac {b^{2} \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\left (a^{2}+\frac {b^{2}}{2}\right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (2 a^{2}+b^{2}\right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\frac {4 a b \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}-\frac {b^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {4 a b \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{2}}\) | \(144\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 49, normalized size = 0.98 \begin {gather*} a^{2} x + \frac {{\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} b^{2}}{4 \, f} - \frac {2 \, a b \cos \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 48, normalized size = 0.96 \begin {gather*} -\frac {b^{2} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, a^{2} + b^{2}\right )} f x + 4 \, a b \cos \left (f x + e\right )}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 78, normalized size = 1.56 \begin {gather*} \begin {cases} a^{2} x - \frac {2 a b \cos {\left (e + f x \right )}}{f} + \frac {b^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {b^{2} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {b^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right )^{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 45, normalized size = 0.90 \begin {gather*} \frac {1}{2} \, {\left (2 \, a^{2} + b^{2}\right )} x - \frac {2 \, a b \cos \left (f x + e\right )}{f} - \frac {b^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 7.61, size = 44, normalized size = 0.88 \begin {gather*} -\frac {\frac {b^2\,\sin \left (2\,e+2\,f\,x\right )}{2}+4\,a\,b\,\cos \left (e+f\,x\right )-2\,a^2\,f\,x-b^2\,f\,x}{2\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________